import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import { HashRouter as Router, Route, Switch } from 'react-router-dom';
import { createBrowserHistory } from "history";
import WrappedNormalLoginForm from './App';
import OrderMeue from './components/OrderMeue';
import DinPlan from './components/DinPlan';
import DinReocord from './components/DinRecord';
import WrappedNormalDinForm from './components/NewDin'
import * as serviceWorker from './serviceWorker';
const Root = () => {
  return (<Router history={createBrowserHistory()}>
    <Switch>
      <Route exact path="/" component={WrappedNormalLoginForm} />
      <Route path="/Order" component={OrderMeue}>
        {/* <Route path="/View/abc" component={MyDocument} />
          <Route path="/View/myPicture" component={MyPicture} />                        */}
         
      </Route>
      <Route path='/dinPlan' component={DinPlan}/>
      {/* <Route path='/dinReco' component={DinReco}/> */}
      <Route path='/newDin' component={WrappedNormalDinForm}/>
      <Route path='/dinReocord' component={DinReocord}/>
    </Switch>
  </Router>)
}
ReactDOM.render(
  // <React.StrictMode>
  //   <WrappedNormalLoginForm/>
  // </React.StrictMode>,
  <Root />,
  document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
